package com.hq.ims.data.entityenum;


import com.hq.web.penum.IBaseEnum;

/**
 * 企业数据状态
 */
public enum EnumDataType implements IBaseEnum {

    Before(0, "之前"),

    After(1, "之后"),

    ;

    private final int code;
    private final String typeName;
    EnumDataType(int code, String typeName) {
        this.code = code;
        this.typeName = typeName;
    }

    /**
     * 根据int类型转换枚举类
     *
     * @param x
     * @return com.hq.data.entityenum.EntityEnumAccountStatus
     */
    public static EnumDataType getByInt(int x) {
        for (EnumDataType value : values()) {
            if (value.code == x) {
                return value;
            }
        }
        return null;
    }

    @Override
    public int getCode() {
        return code;
    }

    public String getTypeName() {
        return typeName;
    }

    @Override
    public String getValue() {
        return typeName;
    }
}
